In addition to the over 700 function calls built into the API, VectorScript also lets you create your own user-defined functions. By creating these custom functions, you can break large script tasks into smaller ones, and build on the work that you have done previously instead of starting over from scratch. Another term for user-defined functions is
subroutines which, as the name implies, are pieces of script code which perform tasks within the main script.
User-defined functions come in two varieties: procedures, which perform actions but are not associated with a value, and
functions, which perform actions and also have an associated value that can be used in situations requiring a constant or expression-derived value.